#ifndef PAGEPISSKIPSTATIONSELECT_H
#define PAGEPISSKIPSTATIONSELECT_H

#include <QWidget>
#include <QPushButton>
#include <QTimer>
#include "globalconfig.h"
#include "global_def.h"

namespace Ui {
class PagePisSkipStationSelect;
}

class PagePisSkipStationSelect : public QWidget
{
    Q_OBJECT
public slots:
    void ChangeLineInfo(uint8_t id);
public:
    explicit PagePisSkipStationSelect(QWidget *parent = nullptr);
    ~PagePisSkipStationSelect();
    void setPageActive(bool xActive);
    uint16_t getSkipStationID() const {return skip_stations_id_;}
    void SyncFeedBackSkipStations(uint16_t value);
private slots:
    void on_Btn_PisSkipStationClear_clicked();
    void on_Btn_PisSkipStationSet_clicked();

signals:
    void signal_SkipStationActive(bool);
    void signal_SkipStationID(uint32_t id);
private:
    Ui::PagePisSkipStationSelect *ui;
    QList<QPushButton *> m_lSkipStationBtnList;
private:
    uint m_nStartx;
    uint m_nStarty;
    uint m_nStationLabelLen;
    uint m_nStationLabelHeight;
    uint m_nHSpace;
    uint m_nVSpace;
    uint8_t m_nColsInRow;
    int m_nCurLineID;
    int m_nSelecMode;
    int total_station_cnt_;
    uint32_t skip_stations_id_;
private:
    void InitSkipStationBtns();
    void ReMarkSkipStationBtns(uint32_t skip_id);
};

#endif // PAGEPISSKIPSTATIONSELECT_H
